using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace GeorgeHerolyants.Converters
{
    class Program
    {
        static int Main ( string[] args )
        {
            try
            {
                IConverter converter = ArgumentsParser.Parse( args );
                converter.Convert();
                return 0;
            }
            catch ( IndexOutOfRangeException )
            {
                Console.WriteLine( "You must specify enough number of arguments" );
                return 1;
            }
            catch ( Exception ex )
            {
                Console.WriteLine( ex.Message );
                return 1;
            }
        }
    }
}
